package Widget

import "github.com/lxn/walk/declarative"

type WidgetEdit struct {
	Sprite   *declarative.LineEdit
	LineEdit *declarative.LineEdit
}

func (w *WidgetEdit) SetLineEdit(txt string) {
	w.LineEdit.Text = txt
}

func CreateWidgetEdit() *WidgetEdit {
	edit := &declarative.LineEdit{
		MaxSize: declarative.Size{Width: 150, Height: 40},
		//Text:     "这是主窗口",
		ReadOnly: true,
	}
	f := &WidgetEdit{
		Sprite: edit,
	}
	f.Sprite = edit
	f.LineEdit = edit
	return f
}
